# 定义了一个学生类：属性:学号，姓名，年龄，性别，身高，体重，成绩，家庭地址，电话号码。行为：学习
# （要求参数传入学习的时间），玩游戏（要求参数传入游戏名），编程（要求参数传入写代码的行数），数的
# 求和（要求参数用变长参数来做，返回求和结果）

# class stu:
#     def __init__(self,number,name,age,sex,high,weight,grade,address,phone):
#         self.number=number
#         self.name=name
#         self.age=age
#         self.sex=sex
#         self.high=high
#         self.weight=weight
#         self.grade=grade
#         self.address=address
#         self.phone=phone
#
#     def study(self,time,):
#         print('学习时间为',time,'min')
#
#     def game(self,s):
#         print('玩的游戏为',s)
#
#     def biancheng(self,n):
#         print('写代码的行数为',n)
#
#     def sum(self,j,k):
#         i=j+k
#         return i
#
# a=stu(1,'lisi',13,'男',130,100,90,'光之国',123456)
# a.study(45)
# a.game('英魂之刃')
# a.biancheng(5)
# res=a.sum(1,2)
# print(res)



# ii.车类：属性：车型号，车轮数，车身颜色，车重量，油箱存储大小 。功能：跑（要求参数传入车的具体功能，比如越野，赛车）
# 创建：法拉利，宝马，铃木，五菱，拖拉机对象
# class car:
#     def __init__(self,xinghao,num_lunzi,colour,weight,high_youxiang):
#         self.xinghao=xinghao
#         self.num_lunzi=num_lunzi
#         self.colour=colour
#         self.weight=weight
#         self.high_youxiang=high_youxiang
#
#     def run(self,y):
#         print(y)
#
#     def falali(self):
#         self.xinghao='法拉利'
#         self.num_lunzi=4
#         self.colour='red'
#         self.weight='1吨'
#         self.high_youxiang=15
#         print(self.xinghao,self.num_lunzi,self.colour,self.weight,self.high_youxiang)
#
#     def baoma(self):
#         self.xinghao = '宝马'
#         self.num_lunzi = 4
#         self.colour = 'red'
#         self.weight = '1吨'
#         self.high_youxiang = 15
#         print(self.xinghao, self.num_lunzi, self.colour, self.weight, self.high_youxiang)
#
#     def lingmu(self):
#         self.xinghao = '铃木'
#         self.num_lunzi = 4
#         self.colour = 'red'
#         self.weight = '1吨'
#         self.high_youxiang = 15
#         print(self.xinghao, self.num_lunzi, self.colour, self.weight, self.high_youxiang)
#
#     def wuling(self):
#         self.xinghao = '五菱'
#         self.num_lunzi = 4
#         self.colour = 'red'
#         self.weight = '1吨'
#         self.high_youxiang = 15
#         print(self.xinghao, self.num_lunzi, self.colour, self.weight, self.high_youxiang)
#
#     def tuolaji(self):
#         self.xinghao = '拖拉机'
#         self.num_lunzi = 4
#         self.colour = 'red'
#         self.weight = '1吨'
#         self.high_youxiang = 15
#         print(self.xinghao, self.num_lunzi, self.colour, self.weight, self.high_youxiang)
#
# a=car(1,2,3,4,5)
# a.baoma()


# 笔记本：属性：型号，待机时间，颜色，重量，cpu型号，内存大小，硬盘大小。  行为：打游戏（传入游戏的名称）,办公。
# class bijiben:
#     def __init__(self,xinghao,time,color,weight,cpu,neicun,yingpan):
#         self.xinghao=xinghao
#         self.time=time
#         self.color=color
#         self.weight=weight
#         self.cpu=cpu
#         self.neicun=neicun
#         self.yingpan=yingpan
#
#     def game(self,name):
#         print(name)
#
#     def work(self):
#         print('办公')



# 猴子类：属性：类别，性别，身体颜色，体重。行为：造火（要求传入造火的材料：比如木棍还是石头），学习事物（要求参
# 数传入学习的具体事物，可以不止学习一种事物）

# class monkey:
#     def __init__(self,leibie,sex,color,weight):
#         self.leibie=leibie
#         self.sex=sex
#         self.color=color
#         self.weight=weight
#
#     def make_fire(self,thing):
#         print('材料是',thing)
#
#     def study(self,s):
#         list=[]
#         list.append(s)
#         print('已学习的',list)
#
# m=monkey('金丝猴','雄性','yellow',15)
# m.study('玩英魂')
# m.study('打瓦')


# 人类：
# 属性:
# 姓名，性别，年龄，所拥有的手机剩余话费，手机品牌，手机电池容量，手机屏幕大小，手机最大待机时长，所拥有的积分。
# 功能：
# 发短信（要求参数传入短信内容）。
# 打电话（要求传入要打的电话号码和要打的时间长度。程序里判断号码是否为空或者本人的话费是否小于1元，若为空或者小
# 于1元则报相对应的错误信息，否则的话拨通。结束后，按照时间长度扣费并返回扣费并且按照分钟给手机卡累加积分（0~10
# 分钟：1元/钟、15个积分/钟，10~20分钟：0.8元/钟、39个积分/钟，其他：0.65元/钟、48个积分/钟））


# class people:
#     def __init__(self,name,age,huafei,phone_pinpai,dianchi,high_weight,long_time,jifen):
#         self.name=name
#         self.age=age
#         self.huafei=huafei
#         self.phone_pinpai=phone_pinpai
#         self.dianchi=dianchi
#         self.high_weight=high_weight
#         self.long_time=long_time
#         self.jifen=jifen
#
#     def duanxin(self,x):
#         print(x)
#
#     def phone(self,number,time):
#         if number=='' or self.huafei<1:
#             print('错误')
#         else:
#             print('成功')
#         if time in range(0,10):
#             self.huafei=self.huafei-time
#             self.jifen=self.jifen+time*15
#         if time in range(10,20):
#             self.huafei=self.huafei-time*0.8
#             self.jifen=self.jifen+time*39
#         else:
#             self.huafei=self.huafei-time*0.65
#             self.jifen=self.jifen+time*48
#
#

